/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.category.service.CategoryService
   Module Description   :

   Date Created      : 2009/11/5
   Original Author   : ellen.li
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.category.service;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

import com.yaodian100.core.common.dao.impl.CommonCriteria;
import com.yaodian100.core.common.exception.CoreException;
import com.yaodian100.core.common.service.DomainService;
import com.yaodian100.ec.category.entity.Category;

/**
 * @author ellen.li
 * 
 */
public interface CategoryService extends DomainService<Category> {
	public List<Object[]> getCategoryLevelTop(Long parentId) throws CoreException;

	public List<Object[]> getCategoryLevelBottom(Long parentId) throws CoreException;

	public List<Category> getChild(Long parentId) throws CoreException;

	public List<Category> getAvailableCategory() throws CoreException;

	public List<Category> getAvailableChild(Long parentId) throws CoreException;

	public List<Category> getAvailableSameLevelCategory(Long parentId, String level) throws CoreException;

	public Category getCategoryById(Long categoryid) throws CoreException;

	public String makeCategorieURL(Long categoryId, boolean addLink) throws CoreException;

	public Category getCategoryByName(String name) throws CoreException;

	public List<Category> getVisibleChild(Long parentId) throws CoreException;

	public Category getAvailableCategory(Long categoryId) throws CoreException;

	public Category save(Category category) throws CoreException;

	public Category updateCategoryAndProductCategory(Category category);

	public List<Category> getSideBarAvailableCategory() throws CoreException;

	public Category getCategoryNonePermission(Serializable oid) throws CoreException;

	public Category getAvailableCategoryNonePermission(Long categoryId) throws CoreException;

	public BigDecimal getGrossProfitByPath(String categoryPath);

	public List<Category> getListNonePermission(int firstResult, int maxResults, CommonCriteria criteria,
			String[] sortOrder) throws CoreException;
}
